Skip to content

Conversation

henry3260
Copy link

@henry3260 henry3260 commented Sep 29, 2025

This PR addresses issue #21179 by reorganizing the cache folder structure for binaries.

Before

  • Binaries for Linux and Darwin were placed directly under:
    • ~/.minikube/cache/linux
    • ~/.minikube/cache/darwin

After

  • They are now moved into a dedicated binaries subfolder:
    • ~/.minikube/cache/binaries/linux
    • ~/.minikube/cache/binaries/darwin

Why

  • This improves organization of the cache directory.
  • Aligns binaries with how other cached items (e.g., images, ISO files) are stored.
  • No functional behavior is changed, only the storage path for binaries.

Fixes #21179

Screenshot (Before)

image

Screenshot (After)

image

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Sep 29, 2025
@k8s-ci-robot k8s-ci-robot requested review from nirs and prezha September 29, 2025 11:35
@k8s-ci-robot k8s-ci-robot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Sep 29, 2025
@k8s-ci-robot
Copy link
Contributor

Hi @henry3260. Thanks for your PR.

I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@k8s-ci-robot k8s-ci-robot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Sep 29, 2025
@minikube-bot
Copy link
Collaborator

Can one of the admins verify this patch?

func Binary(binary, version, osName, archName, binaryURL string) (string, error) {
targetDir := localpath.MakeMiniPath("cache", osName, archName, version)
// targetDir := localpath.MakeMiniPath("cache", osName, archName, version)
targetDir := localpath.MakeMiniPath("cache", "binaries", osName, archName, version)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should use "bin", it is more consistent with ~/.minikube/bin and the rest of the world.

We are using "binaries" internally which would nice to change also to bin but it may be harder since we may code using it. Since this cache directory is new we don't have backward compatibility concerns.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should use "bin", it is more consistent with ~/.minikube/bin and the rest of the world.

We are using "binaries" internally which would nice to change also to bin but it may be harder since we may code using it. Since this cache directory is new we don't have backward compatibility concerns.

Thanks for the suggestion! That makes sense, I’ll update it to use bin for consistency.

@henry3260 henry3260 requested a review from nirs September 29, 2025 13:35
@nirs
Copy link
Contributor

nirs commented Sep 29, 2025

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Sep 29, 2025
@nirs
Copy link
Contributor

nirs commented Sep 29, 2025

/assign @medyagh


// check that the bin directory was created
targetDir := filepath.Join(
os.Getenv("HOME"), ".minikube", "cache", "bin", "linux", "amd64", "v1.31.0",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

~/.minikube is the default, but if MINIKUBE_HOME is defined it will be used. There is a helper function to return the right path (but I don't remember the function name). Check what other tests are doing.

@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Oct 3, 2025
// check that the bin directory was created
targetDir := filepath.Join(
os.Getenv("HOME"), ".minikube", "cache", "bin", "linux", "amd64", "v1.31.0",
localpath.MiniPath(), "cache", "bin", "linux", "amd64", "v1.31.0",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, to make it even better squash this commit into the first one. Having this in git history is not helpful.

@nirs
Copy link
Contributor

nirs commented Oct 3, 2025

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Oct 3, 2025
@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Oct 3, 2025
@nirs
Copy link
Contributor

nirs commented Oct 3, 2025

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Oct 3, 2025
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: henry3260, nirs
Once this PR has been reviewed and has the lgtm label, please ask for approval from medyagh. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@medyagh
Copy link
Member

medyagh commented Oct 17, 2025

/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Oct 17, 2025
Copy link
Member

@medyagh medyagh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for the PR, please update the before/after (it seems to be outdated)

@k8s-ci-robot
Copy link
Contributor

@henry3260: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
pull-minikube-integration fca5789 link true /test pull-minikube-integration

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

@minikube-pr-bot
Copy link

kvm2 driver with docker runtime

┌────────────────┬──────────┬────────────────────────┐
│    COMMAND     │ MINIKUBE │ MINIKUBE  ( PR 21664 ) │
├────────────────┼──────────┼────────────────────────┤
│ minikube start │ 43.3s    │ 43.5s                  │
│ enable ingress │ 16.0s    │ 16.1s                  │
└────────────────┴──────────┴────────────────────────┘

Times for minikube ingress: 15.3s 15.3s 16.4s 15.8s 17.4s
Times for minikube (PR 21664) ingress: 16.9s 16.3s 15.3s 16.3s 15.9s

Times for minikube start: 45.8s 43.6s 42.4s 42.7s 42.0s
Times for minikube (PR 21664) start: 46.1s 41.4s 44.7s 43.5s 41.6s

docker driver with docker runtime

┌────────────────┬──────────┬────────────────────────┐
│    COMMAND     │ MINIKUBE │ MINIKUBE  ( PR 21664 ) │
├────────────────┼──────────┼────────────────────────┤
│ minikube start │ 23.3s    │ 23.8s                  │
│ enable ingress │ 11.1s    │ 11.9s                  │
└────────────────┴──────────┴────────────────────────┘

Times for minikube start: 23.3s 23.0s 23.5s 22.5s 24.4s
Times for minikube (PR 21664) start: 27.2s 22.1s 22.0s 25.3s 22.4s

Times for minikube ingress: 10.7s 10.6s 10.7s 12.6s 10.7s
Times for minikube (PR 21664) ingress: 11.7s 11.8s 11.7s 13.7s 10.7s

docker driver with containerd runtime

┌────────────────┬──────────┬────────────────────────┐
│    COMMAND     │ MINIKUBE │ MINIKUBE  ( PR 21664 ) │
├────────────────┼──────────┼────────────────────────┤
│ minikube start │ 20.9s    │ 20.5s                  │
│ enable ingress │ 21.5s    │ 21.3s                  │
└────────────────┴──────────┴────────────────────────┘

Times for minikube ingress: 21.1s 22.1s 22.1s 21.1s 21.1s
Times for minikube (PR 21664) ingress: 22.1s 20.2s 21.1s 22.2s 21.1s

Times for minikube start: 21.3s 20.2s 21.2s 20.7s 21.2s
Times for minikube (PR 21664) start: 20.2s 23.5s 19.4s 20.5s 19.0s

@minikube-pr-bot
Copy link

Here are the number of top 10 failed tests in each environments with lowest flake rate.

Environment Test Name Flake Rate
none_Linux (2 failed) TestDownloadOnly/v1.28.0/binaries(gopogh) Unknown
none_Linux (2 failed) TestDownloadOnly/v1.34.1/binaries(gopogh) Unknown
Docker_Linux (1 failed) TestNetworkPlugins/group/kubenet/Start(gopogh) 0.00% (chart)
Docker_Windows (5 failed) TestDownloadOnly/v1.28.0/kubectl(gopogh) Unknown
Docker_Windows (5 failed) TestDownloadOnly/v1.34.1/kubectl(gopogh) Unknown
Docker_Windows (5 failed) TestAddons/serial/Volcano(gopogh) Unknown
Docker_Windows (5 failed) TestErrorSpam/setup(gopogh) Unknown
Docker_Windows (5 failed) TestRunningBinaryUpgrade(gopogh) Unknown

Besides the following environments also have failed tests:

To see the flake rates of all tests by environment, click here.

@henry3260
Copy link
Author

thanks for the PR, please update the before/after (it seems to be outdated)

updated!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

move binaries in cache folder under folder called "binaries"

6 participants